
function playPause(){
 var video = document.getElementById('myVideo');
 
  
	 if(video.paused) {
        video.play();
     }
     else {
        video.pause();
     }
    
}
$(function(){

	
	var video = document.getElementById('myVideo');
	console.log(video);
	video.addEventListener('error',function(){
		var error = video.error;
		switch(error.code){
			case 1: 
			alert("视频下载过程被中止")  ;
			break;
			case 2:
			alert("网路故障");
			break;
			case 3:
			alert("解码错误");
			break;
			case 4:
			alert("媒体资源不可用||媒体格式不支持");
			break;
		}
	},false);
	video.addEventListener("canplay" , function(){
		alert("1");
	},false)
	
   
}

	
)


